[Subcontracting] Disable "WIP Item Transfer" for Machine Center - #8747
Conversation
|
Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link. |
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR blocks Transfer WIP Item on setup routing lines when the line type is Machine Center. It also disables the field on the Routing Lines and Routing Version Lines pages, hides the field on the purchase order subform, and adds UI and table validation tests. The change is correct for the setup Routing Line table path. However, the same field also exists on Prod. Order Routing Line, and that table and page still use only Subcontracting to allow the field. Because the actual subcontracting WIP transfer flow reads the production order routing line, the invalid Machine Center setting remains reachable after a routing becomes a production order routing. SuggestionsS1 - Production routing still allows Machine Center Risk assessment and necessityRisk: The affected area is subcontracting manufacturing setup and WIP transfer. The setup routing line change is narrow and has tests, but leaving the production order routing path open can still allow invalid WIP transfer data in the real order flow. No public API signatures or BaseApp event contracts are changed. Necessity: The linked Bug is valid and important: Transfer WIP Item is only meaningful for subcontracting Work Center lines. The fix is necessary, but the current scope is too small because the analogous production order routing path still permits the same invalid configuration.
|
alexei-dobriansky
left a comment
There was a problem hiding this comment.
Please consider the suggestions
Head branch was pushed to by a user without write access
e3abec6
Done |
|
This PR hardens Agent judgement — not directly backed by a BCQuality knowledge article. Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.26.4 |
In this special case it should not be a breaking change, because an parallel PR was created for 28.x branch before the first release of the subcontracting app: |
|
…itabilityOfWIPItemFields
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR disables the Transfer WIP Item control for Machine Center routing lines and adds validation so the flag can only be set on Work Center lines. That is the right direction, and the new UI and validation tests cover the direct edit path. The fix is still incomplete because production order routing lines can receive the flag from routing lines through copy/refresh logic without running the new validation. SuggestionsS1 - Machine-center WIP flags still copy forward Risk assessment and necessityRisk: This area drives WIP transfer order creation and warehouse flow. If an old Machine Center routing line keeps the flag, the system can still create inventory movement for a scenario this PR is meant to block. Necessity: The change is needed because Machine Centers should not use Transfer WIP Item. The scope must also cover copied or existing data, not only new page edits.
|
As mentioned earlier no upgrade should be needed. |
|
This PR seems to have more changes now than its 28.x counterpart #8748 so if we also want them on 28.x, let's not forget the second half of the backport |
|
High — The Italian migration creates the state this PR prohibits The legacy [RoutingLine.Table.al:396-407] has no Type validation. Therefore legacy Machine Center lines can legitimately reach migration with WIP Item = true. The migration then:
That bypasses the new invariant. The resulting Machine Center flag becomes disabled in the UI, while [SubcProdOrderRtngExt.Codeunit.al:197-207] Required:
|
As mentioned earlier no upgrade should be needed becaus ethis part of code shopuld be already in BC28.x |
What & why
This pull request introduces stricter validation and improved UI logic for the "Transfer WIP Item" field on routing lines, ensuring that this field is only enabled and valid for "Work Center" type routing lines with subcontracting enabled. It also adds comprehensive automated UI and validation tests to guarantee correct behavior, and refactors some test utilities for better coverage and maintainability.
Validation and UI logic improvements:
Subc. PO Subformpage extension.Automated test coverage:
Subc. Subcontracting UI Testto verify that the "Transfer WIP Item" field is only enabled for eligible Work Center lines and not for Machine Center lines, and that validation fails if incorrectly set.Test utility enhancements:
CreateRoutingLineForMachineCenterhelper in the manufacturing management test library to streamline test setup for Machine Center routing lines, and madeCreateRoutingLinepublic for broader utility. [1] [2]Linked work
Fixes AB#640173
How I validated this
What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)
Added Tests and do a manual validation in client
Risk & compatibility
None